package com.shigen.demo.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shigen.demo.entity.Project;
import com.shigen.demo.entity.vo.ProjectVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

@Component
public interface ProjectMapper extends BaseMapper<Project> {

  @Select("select * from project where proj_id = #{id}")
  Project getProject(String id);

  IPage<ProjectVo> getProjectList(@Param("page") Page<ProjectVo> page, @Param(Constants.WRAPPER) QueryWrapper<ProjectVo> wrapper);

  ProjectVo getProjectDetail(@Param("id") String id);
}
